package com.zrrd.network.tcp.client;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author WanJl
 * @version 1.0
 * @title Client01
 * @description 客户端
 * @create 2023/10/22 14:30
 */
public class Client01 {
    public static void main(String[] args) throws IOException {
        //1、创建客户端Socket对象
        Socket client = new Socket("127.0.0.1",10010);
        //2、获取输出流，写数据。
        OutputStream os = client.getOutputStream();
        os.write("客户端连接服务器啦~~~~".getBytes());

        //3、释放资源
        client.close();
    }
}
